package com.geeguo.ebuilder.operation.business.system.webmodule.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.geeguo.ebuilder.operation.business.system.webmodule.model.WebModuleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

@Mapper
public interface WebModuleMapper extends BaseMapper<WebModuleEntity> {

    List<WebModuleEntity> listAll();

    List<WebModuleEntity> listByUser(@Param("userId") String userId);

    Set<String> listPermissionCode(int type);

    Set<String> listPermissionCodeByUser(@Param("userId") String userId, @Param("type") Integer type);

    Integer updateByParams(@Param("params") Map<String, Object> changeValues);

    Integer getChildCount(@Param("id") String id);

    Integer getMaxSequence(@Param("id") String id);

    Integer existsName(@Param("name") String name);
}